/*
* ============================================================================
*  Name     : CLogExampleLogDatabaseObserver from LogExampleLogDatabaseObserver.h
*  Part of  : LogExample
*  Created  : 26.05.2005 by Forum Nokia 
*  Description:
*  Version  : 1.0
*  Copyright: Nokia Corporation
* ============================================================================
*/

#ifndef __LOGEXAMPLELOGDATABASEOBSERVER_H__
#define __LOGEXAMPLELOGDATABASEOBSERVER_H__

// INCLUDE FILES
#include <e32base.h>
#include <f32file.h>        // RFs
#include <logcli.h>			// CLogClient


// CLASS DECLARATION

class MDatabaseObserver;

class CLogExampleLogDatabaseObserver : public CActive
	{

public:

	/**
	* Symbian OS default constructor
	* @param aObserver observer to observe database changes
	*/
	CLogExampleLogDatabaseObserver(MDatabaseObserver& aObserver);
	
	/**
	* Destructor
	*/
	virtual ~CLogExampleLogDatabaseObserver();
	
	/**
	* Two-phased constructor.
	* @param aObserver observer to observe database changes
	*/
	static CLogExampleLogDatabaseObserver* NewL(MDatabaseObserver& aObserver);
	
	/**
	* Two-phased constructor.
	* @param aObserver observer to observe database changes
	*/
	static CLogExampleLogDatabaseObserver* NewLC( MDatabaseObserver& aObserver);
	
	/**
	* Sets to notify for changes in database
	*/
	void NotifyChange();

private:

	/**
	* Symbian OS default constructor
	*/
	void ConstructL(MDatabaseObserver& aObserver);
	
	/**
	* From CActive
	*/	
	void RunL(); 
	
	/**
	* From CActive
	*/
	void DoCancel(); 

	
private: // Data members

	RFs iFs;
	
	CLogClient* iLogClient;
	MDatabaseObserver& iObserver;
	
	};

#endif	

// End of file
